home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / utility / cmpdir20.zip / CMPDIR.DOC next >
Text File  |  1992-04-19  |  12KB  |  245 lines

  1. CMPDIR 2.0 (c)1990,1992 Developer Services Inc - Wichita KS     CMPDIR.DOC
  2.  
  3.  
  4. CMPDIR is a shareware utility to compare the contents of two 
  5. subdirectories, and report the results.  It can also be restricted to 
  6. specific files or groups of files thru use of DOS wildcards.  It is a 
  7. very handy tool to have when installing software upgrades and new 
  8. releases, or when you find there are two copies of the same 
  9. application installed on, say, different network file servers and you 
  10. need to know whether Bill's copy and Sue's copy are the same.
  11.  
  12. A sample of the output produced by CMPDIR can be found later in this 
  13. documentation.  CMPDIR also returns a DOS errorlevel for testing from 
  14. within a batch file, which makes it useful for things like insuring 
  15. that network users are mapped to the correct version of DOS before 
  16. allowing them to log in, etc.
  17.  
  18.  
  19. INSTALLATION
  20. ------------
  21. Installation of CMPDIR is straightforward and no special install 
  22. procedure is supplied.  Simply copy CMPDIR.EXE into a directory in 
  23. your path, or put a batch file in your path which includes its fully 
  24. qualified pathname.
  25.  
  26.  
  27. USAGE 
  28. ----- 
  29. To use CMPDIR, simply issue the command with the two pathnames you 
  30. wish to compare, plus any option switches you may wish to use to 
  31. control its execution.  The pathnames may include DOS wildcard 
  32. characters in the filename, so you can restrict the comparison to only 
  33. certain files in each directory.
  34.  
  35. Issuing the CMPDIR command with no arguments produces a help screen 
  36. like the following:
  37.  
  38.     CMPDIR 2.0 (c)1990,1992 Developer Services Inc - Wichita KS
  39.     Usage: cmpdir  [switches]  directory_path_1  directory_path_2
  40.  
  41.     Switches:
  42.       -c = don't physically compare apparent matching files
  43.       -t = don't physically compare if only differ in timestamp
  44.       -m = include matching files in listing
  45.       -q = quiet - just return errorlevel at 1st mismatch
  46.       -s = print summary only; do not list individual files
  47.       -b = only consider files appearing in both directories
  48.       -1 = only consider files appearing in directory_path_1
  49.       -2 = only consider files appearing in directory_path_2
  50.       -? = display this help information
  51.  
  52.     Errorlevel: 0 = no mismatches found
  53.         1 = miscompare of 2 files
  54.         2 = missing files
  55.         3 = both miscompares and missing files
  56.            98 = one or both directories empty or not found
  57.            99 = cmpdir usage error
  58.  
  59. CMPDIR 2.0 (c)1990,1992 Developer Services Inc - Wichita KS     CMPDIR.DOC
  60.  
  61. OPTION SWITCHES
  62. ---------------
  63.  
  64. An expanded discussion of the options appears below. The option 
  65. switches provided in CMPDIR may appear anywhere in the command line; 
  66. they don't have to precede the directory names.  They may be either 
  67. upper or lower case, and you may use either a dash (-) or slash (/) to 
  68. identify an option.  Each option must be specified separately, and 
  69. must be separated from every other command line element by whitespace.  
  70. i.e.
  71.  
  72.       CMPDIR -c -m DIRA DIRB   is CORRECT
  73.       CMPDIR -c-m DIRA DIRB    is not
  74.       CMPDIR -cm DIRA DIRB     is not
  75.  
  76.     -c = don't physically compare apparent matching files
  77.     -----------------------------------------------------
  78.     By default, CMPDIR does a byte-for-byte comparison of the contents 
  79.     of any pair of files which appear, from the other properties (same 
  80.     name, size, and timestamp), to be identical.  Using the -c option 
  81.     causes CMPDIR to bypass this physical comparison. This makes CMPDIR 
  82.     run very quickly, but you give up the absolute assurance that
  83.     the files' contents are really identical.
  84.  
  85.     -t = don't physically compare if only differ in timestamp
  86.     ---------------------------------------------------------
  87.     By default, if a pair of files have the same name and size, but 
  88.     have a different date and/or time, CMPDIR will attempt to do a 
  89.     physical byte-for-byte compare to see if they are actually the 
  90.     same.  It oftentimes happens that identical copies of a file have
  91.     differing timestamps, and CMPDIR always tests for this possibility 
  92.     unless you use the -t option.  When you use the -t option, 
  93.     identical files with different timestamps are considered to be
  94.     mismatches.
  95.  
  96.     -m = include matching files in listing
  97.     --------------------------------------
  98.     Files which match in every respect (name, size, timestamp, and 
  99.     contents [unless you used the -c option] are omitted from the body 
  100.     of the output report by default.  If you want matching files to be 
  101.     listed, include the -m option switch in your command line.
  102.  
  103.     -q = quiet - just return errorlevel at 1st mismatch
  104.     ---------------------------------------------------
  105.     This switch causes CMPDIR to omit its normal output report, and
  106.     simply return the DOS errorlevel upon encountering a mismatch.  
  107.     Note that with this option errorlevel can never return as 3.
  108.     The -q option does not cause suppression of error messages, just 
  109.     the detail report and summary.
  110.  
  111. CMPDIR 2.0 (c)1990,1992 Developer Services Inc - Wichita KS     CMPDIR.DOC
  112.  
  113. OPTION SWITCHES continued
  114. -------------------------
  115.  
  116.     -s = print summary only; do not list individual files
  117.     -----------------------------------------------------
  118.     CMPDIR's report consists of two sections: body, where individual 
  119.     files are listed, and summary where overall statistics are 
  120.     reported for the entire operation (see examples).  The -s option 
  121.     suppresses the listing of individual mismatched files, reporting 
  122.     them only in the summary.  Note that this option can be used in 
  123.     combination with the -m switch to produce a listing of -only- the 
  124.     matching files.
  125.  
  126.     -b = only consider files appearing in both directories
  127.     ------------------------------------------------------
  128.     The -b says "I don't care about the files that exist in only one
  129.     directory or the other, just tell me about those that are in 
  130.     both places."
  131.  
  132.     -1 = only consider files appearing in directory_path_1
  133.     -2 = only consider files appearing in directory_path_2
  134.     ------------------------------------------------------
  135.     These options are useful when you want one of the paths to be the 
  136.     "controlling" path for the report.  As an example, suppose you have 
  137.     a directory named BIN in which you keep many different utilities,
  138.     shareware packages, etc.  Then say you receive an updated version of 
  139.     one of the packages and you want to see what files changed from 
  140.     the old version to the new.  Create a directory and unzip the new 
  141.     package, then do "CMPDIR -1 C:\NEW_PKG  C:\BIN".  Without the "-1" 
  142.     switch, the report would list all the many other files in \BIN 
  143.     that have nothing at all to do with the files of interest.
  144.  
  145.     -? = display this help information
  146.     ----------------------------------
  147.     Entering CMPDIR -? (or simply CMPDIR with no arguments) produces 
  148.     the help screen illustrated previously in this document.
  149.  
  150.  
  151. CMPDIR 2.0 (c)1990,1992 Developer Services Inc - Wichita KS     CMPDIR.DOC
  152.  
  153. CMPDIR Sample Output
  154. --------------------
  155.  
  156. Below is a sample of the output report generated by CMPDIR.  Note that
  157. the first file listed is a subdirectory name.  The status indicators
  158. have the following meaning:
  159.  
  160.     T = the timestamps are different
  161.     S = the sizes are different (hence contents have to be also)
  162.     C = the contents are different
  163.     = = the timestamps are different but contents is the same
  164.     E = error on open or read for file compare; files MAY match
  165.     M = the files match (shown only if -m switch used)
  166.  
  167. CMPDIR 2.0 (c)1990,1992 Developer Services Inc - Wichita KS
  168. T:\HYPER\*.*                              T:\HYPER\STORE08.VER\*.*
  169. --------------------------                --------------------------
  170.   size       timestamp      --filename--    size       timestamp      status
  171. -------- -----------------                -------- -----------------
  172.        0 91/09/30 08:38:08  store08.ver 
  173.   118120 92/04/20 05:42:04  answer.log  
  174.      142 90/08/07 17:23:36  answer.nix         147 89/07/20 11:01:22  TS   
  175.    18705 89/02/03 17:09:36  answer.rdy       17914 88/06/06 14:19:30  TS   
  176.       47 89/05/26 08:55:44  batch.rcv           25 89/03/06 18:40:20  TS   
  177.                             batch.snd           71 89/07/20 11:04:04
  178.       94 89/07/17 14:06:24  batch08.mor 
  179.       47 89/07/18 07:56:00  batch08.snd 
  180.       47 89/07/20 10:53:44  batch10.snd 
  181.      363 89/08/17 12:52:00  call.log    
  182.      172 89/08/17 12:50:34  call.lst           172 90/06/15 17:30:18  T C  
  183.    19470 89/02/03 17:09:18  call.rdy         18411 88/04/08 13:53:52  TS   
  184.     2911 89/05/26 08:15:44  color_ha.set
  185.       16 92/04/17 16:24:36  ha.bat              16 90/06/15 17:29:54     = 
  186.     2911 89/06/02 16:20:18  ha.set            2911 89/05/26 08:46:44     = 
  187.    93456 89/03/01 11:10:24  hacode.exe       93056 88/06/06 13:48:34  TS   
  188.    84384 89/03/10 10:56:30  hacode.ovl       83872 88/06/06 13:48:32  TS   
  189.     1004 88/09/23 10:49:18  modems.lst        1012 88/04/08 13:56:20  TS   
  190.    13483 89/01/05 15:30:08  startup2.rdy     13876 88/04/11 13:22:14  TS   
  191.       48 89/05/26 09:01:42  trans.nix           46 89/07/20 10:50:08  TS   
  192.  
  193. CMPDIR Summary:
  194.     7 names appear only in T:\HYPER\
  195.     1 names appear only in T:\HYPER\STORE08.VER\
  196.    31 names appear in both directories, of which there are
  197.        19 identical [M] (contents WERE compared)
  198.         2 identical [=] w/differing timestamps
  199.        10 differ in [T]imestamp, [S]ize or [C]ontents
  200.  
  201. CMPDIR 2.0 (c)1990,1992 Developer Services Inc - Wichita KS     CMPDIR.DOC
  202.  
  203. Warranty, Registration, and Support Information
  204.  
  205. Warranty of CMPDIR 
  206. ------------------ 
  207. DSI warrants this product to perform essentially as described in this 
  208. document, and no further warranty is offered or implied.  Liability of 
  209. DSI under this warranty is limited to refund of the amount you paid to 
  210. us for license to use the software.  DSI does not accept any liability 
  211. for damages of any nature arising from the use of CMPDIR.
  212.  
  213. Registering CMPDIR
  214. ------------------
  215. CMPDIR was written by Jim Cunningham of Developer Services, Inc., and 
  216. is distributed as copyrighted shareware.  The shareware concept allows 
  217. you to try the software before you pay for it, to make certain that it 
  218. performs as advertised, and that it is indeed useful to you.  It does 
  219. not give you the right to use it indefinitely without compensation to 
  220. its owner.
  221.  
  222. If you use CMPDIR and find it of benefit, you are required to register 
  223. your copy and pay a small fee (see schedule on the order form) for its 
  224. use.  Registration of a copy of the software entitles you, the 
  225. licensee, to use that copy on one computer at a time.  You may have it 
  226. installed on more than one computer as long as there is no chance that 
  227. more than one copy will be in use at the same time. Registering also 
  228. entitles you to technical support, and notice of future versions of 
  229. the product.
  230.  
  231. To register, please print a copy of the REGISTER.DOC file, fill in the 
  232. blanks, and mail it along with registration fee (sorry, no credit 
  233. cards yet) to:
  234.  
  235.                   Jim Cunningham
  236.                   Developer Services, Inc.
  237.                   1445 N Rock Rd, #175
  238.                   Wichita, KS  67206
  239.  
  240. Technical Support
  241. -----------------
  242. Technical support for CMPDIR is available by phone, 8-5 Central Time 
  243. Monday thru Friday, at (316) 634-2985, or via CompuServe, ID 75730,774.
  244. DSI also has a 24-hour FAX line at (316) 634-2092.
  245.